package cn.imnaer.service.rest.view.model;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

import cn.imnaer.service.persistence.model.SharePhotoComment;

/**
 * Created by Administrator on 2015/5/6.
 */
public class SharePhotoCommentResponse implements Serializable {

    /**
     * 评论ID
     */
    private String commentId;
    /**
     * 相片Id
     */
    private String sharePhotoItemId;
    /**
     * 用户ID
     */
    private String userId;
    /**
     * 用户名
     */
    private String userName;
    /**
     * 评论内容
     */
    private String content;
    /**
     * 创建时间
     */
    private Long createTime;
    /**
     * 回复的用户ID
     */
    private String replyUserId;

    public SharePhotoCommentResponse parse(SharePhotoComment target) {
        this.commentId = target.getCommentId();
        this.sharePhotoItemId = target.getSharePhotoItemId();
        this.userId = target.getUserId();
        this.userName = target.getUserName();
        this.content = target.getContent();
        this.createTime = target.getCreateTime();
        this.replyUserId = target.getReplyUserId();
        return this;
    }

    public static List<SharePhotoCommentResponse> parseList(List<SharePhotoComment> targetList) {
        List<SharePhotoCommentResponse> result = new ArrayList<>();
        for (SharePhotoComment item : targetList) {
            result.add(new SharePhotoCommentResponse().parse(item));
        }
        return result;
    }


    /**
     * *****************************************************************************************************************************************
     */

    public String getCommentId() {
        return commentId;
    }

    public void setCommentId(String commentId) {
        this.commentId = commentId;
    }

    public String getSharePhotoItemId() {
        return sharePhotoItemId;
    }

    public void setSharePhotoItemId(String sharePhotoItemId) {
        this.sharePhotoItemId = sharePhotoItemId;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public Long getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Long createTime) {
        this.createTime = createTime;
    }

    public String getReplyUserId() {
        return replyUserId;
    }

    public void setReplyUserId(String replyUserId) {
        this.replyUserId = replyUserId;
    }
}
